package com.aihwcm.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;


/**
 * Aihtasks entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name="aihtasks"
    ,catalog="aihwcmdb"
)

public class Aihtasks  implements java.io.Serializable {


    // Fields    

     private Integer taskid;
     private String taskname;
     private String taskcontent;
     private String taskresult;
     private String taskstate;
     private Aihusers aihusers;

    // Constructors

    /** default constructor */
    public Aihtasks() {
    }

    
    /** full constructor */
    public Aihtasks(String taskname, String taskcontent, String taskresult, String taskstate, Aihusers aihusers) {
        this.taskname = taskname;
        this.taskcontent = taskcontent;
        this.taskresult = taskresult;
        this.taskstate = taskstate;
        this.aihusers = aihusers;
    }

   
    // Property accessors
    @Id @GeneratedValue
    
    @Column(name="taskid", unique=true, nullable=false)

    public Integer getTaskid() {
        return this.taskid;
    }
    
    public void setTaskid(Integer taskid) {
        this.taskid = taskid;
    }
    
    @Column(name="taskname", length=100)

    public String getTaskname() {
        return this.taskname;
    }
    
    public void setTaskname(String taskname) {
        this.taskname = taskname;
    }
    
    @Column(name="taskcontent", length=100)

    public String getTaskcontent() {
        return this.taskcontent;
    }
    
    public void setTaskcontent(String taskcontent) {
        this.taskcontent = taskcontent;
    }
    
    @Column(name="taskresult", length=100)

    public String getTaskresult() {
        return this.taskresult;
    }
    
    public void setTaskresult(String taskresult) {
        this.taskresult = taskresult;
    }
    
    @Column(name="taskstate", length=20)

    public String getTaskstate() {
        return this.taskstate;
    }
    
    public void setTaskstate(String taskstate) {
        this.taskstate = taskstate;
    }
   
	@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="userid")
	public Aihusers getAihusers() {
	    return this.aihusers;
	}
	
	public void setAihusers(Aihusers aihusers) {
	    this.aihusers = aihusers;
	}

}